home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / falcon / graphics / xgrabber.lzh / GFX->RAW.GFA (.txt) < prev    next >
GFA-BASIC Atari  |  1994-05-06  |  1KB  |  44 lines

  1. DIM regs%(15)
  2. ' ## INLINE:
  3. ' $0000: 53 80 72 0f 47 e8 00 10 76 00 e3 e3 d7 43 e3 e3 
  4. ' $0010: d7 43 e3 e3 d7 43 e3 e3 d7 43 e3 e3 d7 43 e3 e3 
  5. ' $0020: d7 43 e3 e3 d7 43 e3 e3 d7 43 34 f1 34 00 14 f1 
  6. ' $0030: 34 03 51 c9 ff d0 41 e8 00 10 53 80 6a c4 4e 75 
  7. ' 64  Bytes.
  8. INLINE asm_rout%,64
  9. FILESELECT DIR$(0)+"\*.GFX","",fname$
  10. IF fname$<>""
  11.   RESERVE 10000
  12.   OPEN "i",#1,fname$
  13.   res$=INPUT$(38,#1)
  14.   pal256$=INPUT$(1024,#1)
  15.   pal16$=INPUT$(32,#1)
  16.   IF BTST(CVI(MID$(res$,3,2)),4)
  17.     w#=(CVI(MID$(res$,39-6,2))+CVI(MID$(res$,39-4,2)))*2
  18.     h#=(CVI(MID$(res$,25,2))-CVI(MID$(res$,23,2)))/2
  19.     IF BTST(CVI(MID$(res$,31,2)),0)
  20.       h#=h#/2
  21.     ENDIF
  22.     IF BTST(CVI(MID$(res$,31,2)),1)
  23.       h#=h#*2
  24.     ENDIF
  25.     BGET #1,HIMEM,LOF(#1)-38-1024-32
  26.     ziel%=HIMEM+LOF(#1)-38-1024-32
  27.     regs%(0)=w#*h#/16
  28.     regs%(8)=HIMEM
  29.     regs%(9)=V:pal256$
  30.     regs%(10)=ziel%
  31.     RCALL asm_rout%,regs%()
  32.     OPEN "o",#2,LEFT$(fname$,RINSTR(fname$,"."))+"RAW"
  33.     PRINT #2,w#;" ";h#;CHR$(10);
  34.     BPUT #2,ziel%,w#*h#*3
  35.     CLOSE #2
  36.   ELSE
  37.     CLS
  38.     PRINT "Sorry!"
  39.     PRINT "Ich konvertiere nur 256-Farben-Bilder!"
  40.     ~INP(2)
  41.   ENDIF
  42.   CLOSE #1
  43. ENDIF
  44.